home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / catch_flies.swf / scripts / DefineButton2_44 / BUTTONCONDACTION on(press).as next >
Encoding:
Text File  |  2006-06-13  |  1.2 KB  |  53 lines

  1. on(press){
  2.    function hitfly(number)
  3.    {
  4.       _root.flies += 1;
  5.       setProperty("/burst", _X, getProperty("/chopsticks", _X));
  6.       setProperty("/burst", _Y, getProperty("/chopsticks", _Y));
  7.       tellTarget("/burst")
  8.       {
  9.          play();
  10.       }
  11.       tellTarget("_root.fly" add number add ".move")
  12.       {
  13.          gotoAndStop("fall");
  14.          play();
  15.       }
  16.       _root.time += _root.plustime;
  17.       tellTarget("_root.success")
  18.       {
  19.          play();
  20.       }
  21.       tellTarget("_root.timer")
  22.       {
  23.          gotoAndStop("count");
  24.          play();
  25.       }
  26.    }
  27.    gotoAndStop(2);
  28.    if(_root.chopsticks.invisible.hitTest(_root.fly1) eq true)
  29.    {
  30.       return hitfly(1);
  31.    }
  32.    if(_root.chopsticks.invisible.hitTest(_root.fly2) eq true)
  33.    {
  34.       return hitfly(2);
  35.    }
  36.    if(_root.chopsticks.invisible.hitTest(_root.fly3) eq true)
  37.    {
  38.       return hitfly(3);
  39.    }
  40.    if(_root.chopsticks.invisible.hitTest(_root.fly4) eq true)
  41.    {
  42.       return hitfly(4);
  43.    }
  44.    if(_root.chopsticks.invisible.hitTest(_root.fly5) eq true)
  45.    {
  46.       return hitfly(5);
  47.    }
  48.    if(_root.chopsticks.invisible.hitTest(_root.fly6) eq true)
  49.    {
  50.       return hitfly(6);
  51.    }
  52. }
  53.